\(\int \csc ^2(e+f x) (b \tan (e+f x))^n \, dx\) [177]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 25 \[ \int \csc ^2(e+f x) (b \tan (e+f x))^n \, dx=-\frac {b (b \tan (e+f x))^{-1+n}}{f (1-n)} \]

[Out]

-b*(b*tan(f*x+e))^(-1+n)/f/(1-n)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2671, 30} \[ \int \csc ^2(e+f x) (b \tan (e+f x))^n \, dx=-\frac {b (b \tan (e+f x))^{n-1}}{f (1-n)} \]

[In]

Int[Csc[e + f*x]^2*(b*Tan[e + f*x])^n,x]

[Out]

-((b*(b*Tan[e + f*x])^(-1 + n))/(f*(1 - n)))

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2671

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> With[{ff = FreeFactors[Ta
n[e + f*x], x]}, Dist[b*(ff/f), Subst[Int[(ff*x)^(m + n)/(b^2 + ff^2*x^2)^(m/2 + 1), x], x, b*(Tan[e + f*x]/ff
)], x]] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2]

Rubi steps \begin{align*} \text {integral}& = \frac {b \text {Subst}\left (\int x^{-2+n} \, dx,x,b \tan (e+f x)\right )}{f} \\ & = -\frac {b (b \tan (e+f x))^{-1+n}}{f (1-n)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.28 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.88 \[ \int \csc ^2(e+f x) (b \tan (e+f x))^n \, dx=\frac {b (b \tan (e+f x))^{-1+n}}{f (-1+n)} \]

[In]

Integrate[Csc[e + f*x]^2*(b*Tan[e + f*x])^n,x]

[Out]

(b*(b*Tan[e + f*x])^(-1 + n))/(f*(-1 + n))

Maple [A] (verified)

Time = 1.82 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.20

method result size
derivativedivides \(\frac {{\mathrm e}^{n \ln \left (b \tan \left (f x +e \right )\right )}}{f \left (-1+n \right ) \tan \left (f x +e \right )}\) \(30\)
default \(\frac {{\mathrm e}^{n \ln \left (b \tan \left (f x +e \right )\right )}}{f \left (-1+n \right ) \tan \left (f x +e \right )}\) \(30\)
risch \(\text {Expression too large to display}\) \(1750\)

[In]

int(csc(f*x+e)^2*(b*tan(f*x+e))^n,x,method=_RETURNVERBOSE)

[Out]

1/f/(-1+n)*exp(n*ln(b*tan(f*x+e)))/tan(f*x+e)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.68 \[ \int \csc ^2(e+f x) (b \tan (e+f x))^n \, dx=\frac {\left (\frac {b \sin \left (f x + e\right )}{\cos \left (f x + e\right )}\right )^{n} \cos \left (f x + e\right )}{{\left (f n - f\right )} \sin \left (f x + e\right )} \]

[In]

integrate(csc(f*x+e)^2*(b*tan(f*x+e))^n,x, algorithm="fricas")

[Out]

(b*sin(f*x + e)/cos(f*x + e))^n*cos(f*x + e)/((f*n - f)*sin(f*x + e))

Sympy [F]

\[ \int \csc ^2(e+f x) (b \tan (e+f x))^n \, dx=\int \left (b \tan {\left (e + f x \right )}\right )^{n} \csc ^{2}{\left (e + f x \right )}\, dx \]

[In]

integrate(csc(f*x+e)**2*(b*tan(f*x+e))**n,x)

[Out]

Integral((b*tan(e + f*x))**n*csc(e + f*x)**2, x)

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.12 \[ \int \csc ^2(e+f x) (b \tan (e+f x))^n \, dx=\frac {b^{n} \tan \left (f x + e\right )^{n}}{f {\left (n - 1\right )} \tan \left (f x + e\right )} \]

[In]

integrate(csc(f*x+e)^2*(b*tan(f*x+e))^n,x, algorithm="maxima")

[Out]

b^n*tan(f*x + e)^n/(f*(n - 1)*tan(f*x + e))

Giac [F]

\[ \int \csc ^2(e+f x) (b \tan (e+f x))^n \, dx=\int { \left (b \tan \left (f x + e\right )\right )^{n} \csc \left (f x + e\right )^{2} \,d x } \]

[In]

integrate(csc(f*x+e)^2*(b*tan(f*x+e))^n,x, algorithm="giac")

[Out]

integrate((b*tan(f*x + e))^n*csc(f*x + e)^2, x)

Mupad [B] (verification not implemented)

Time = 3.00 (sec) , antiderivative size = 53, normalized size of antiderivative = 2.12 \[ \int \csc ^2(e+f x) (b \tan (e+f x))^n \, dx=-\frac {\sin \left (2\,e+2\,f\,x\right )\,{\left (\frac {b\,\sin \left (2\,e+2\,f\,x\right )}{2\,{\cos \left (e+f\,x\right )}^2}\right )}^n}{2\,f\,\left ({\cos \left (e+f\,x\right )}^2-1\right )\,\left (n-1\right )} \]

[In]

int((b*tan(e + f*x))^n/sin(e + f*x)^2,x)

[Out]

-(sin(2*e + 2*f*x)*((b*sin(2*e + 2*f*x))/(2*cos(e + f*x)^2))^n)/(2*f*(cos(e + f*x)^2 - 1)*(n - 1))